package jmu.service.impl;

import jmu.dao.RevertDAO;
import jmu.service.RevertService;
import jmu.vo.Revert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RevertServiceImpl implements RevertService {
    @Autowired
    RevertDAO revertDAO;

    @Override
    public Revert findById(int id) {
        return revertDAO.findById(id);
    }

    @Override
    public List<Revert> findRevert(int id) {
        return revertDAO.findAllRevertByMessageID(id);
    }

    @Override
    public boolean insertRevert(Revert revert) {
        return revertDAO.insertRevert(revert);
    }

    @Override
    public boolean updateRevert(Revert revert) {
        return revertDAO.updateRevert(revert);
    }

    @Override
    public boolean deleteRevert(int id) {
        return revertDAO.deleteRevert(id);
    }
}
